package svc

import (
	"api/internal/config"
	"car_srv/carclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	CarSrv carclient.Car
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		CarSrv: carclient.NewCar(zrpc.MustNewClient(c.CarSrv)),
	}
}
